//
//  ZYHomeController.m
//  VeiBo
//
//  Created by apple on 16/12/2.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "ZYHomeController.h"
#import "ZYTempController.h"

@interface ZYHomeController ()

@end

@implementation ZYHomeController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setupUI];
    
}
- (void)setupUI{
    [self setupNav];
}
- (void)setupNav{
    
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem ZY_setButtonItemImageName:@"navigationbar_pop" title:nil target:self action:@selector(leftClick)];
    self.navigationItem.rightBarButtonItem = [UIBarButtonItem ZY_setButtonItemImageName:@"navigationbar_friendsearch" title:nil target:self action:@selector(rightClick)];

//    UIButton* leftButton = [UIButton ZY_setImageName:@"navigationbar_pop" target:self action:@selector(leftClick)];
//      self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftButton];
//    UIButton* rightButton = [UIButton ZY_setImageName:@"navigationbar_friendsearch" target:self action:@selector(rightClick)];
//     self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightButton];
    
    
//    UIButton* btn = [[UIButton alloc] init];
//    [btn addTarget:self action:@selector(leftClick) forControlEvents:UIControlEventTouchUpInside];
//    [btn setImage:[UIImage imageNamed:@"navigationbar_pop"] forState:UIControlStateNormal];
//    [btn setImage:[UIImage imageNamed:@"navigationbar_pop_highlighted"] forState:UIControlStateHighlighted];
//    [btn sizeToFit];
//    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:btn];
}
- (void)leftClick{
    
    NSLog(@"左");
}
- (void)rightClick{
    
    ZYTempController* tepVc = [[ZYTempController alloc] init];
    tepVc.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:tepVc animated:YES];
    
}

@end
